﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Text.RegularExpressions;
using Coronox.SkyShell;

namespace SkyShell
{
    /// <summary>
    /// Interaction logic for BrowserWindow.xaml
    /// </summary>
    public partial class BrowserWindow : Window
    {
        public BrowserWindow()
        {
            InitializeComponent();
            webBrowser.Navigate(SkyDriveAction.SignInUrl);
        }

        private void webBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            //if (e.Uri.AbsoluteUri.Contains("code="))
            //{
            //    SkyDriveAction.AuthCode = Regex.Split(e.Uri.AbsoluteUri, "code=")[1];
            //    this.Close();
            //}
        }

    }
}
